package com.yourwork.common.jpa;

import java.util.List;

import javax.persistence.Table;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.yourwork.model.Consumption;

@Repository
@Table(name="Record")
@Qualifier("recordRepositoey")
public interface ConsumptionRepositoey extends JpaRepository<Consumption, Integer> {
	//查询
	@Query("SELECT r.number FROM Consumption r GROUP BY r.number")
	public List<String> queryNumber(Pageable pageable);
	//查询详细信息
	public List<Consumption> findByNumber(String number);
	//查询
	@Query("SELECT r.number FROM Consumption r GROUP BY r.number")
	public List<String> queryNumber();
	//分页查询员工服务
	public List<Consumption> findByNumber(String number, Pageable pageable);
	
}
